<template>
  <div>
    <div>
      <h2>嵌套路由</h2>
      <router-link to="/home">主页</router-link>
      <router-link to="/news">新闻</router-link>
      <router-link to="/sports">体育</router-link>
    </div>
    <hr />
    <div>
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {};
</script>

<style scoped>
/* 精确匹配 路径一个都不能差*/
.router-link-exact-active {
  color: red;
}
.router-link-active {
  color: red;
}
</style>